case class pro(name: String, age: Int)

object HelloScala {
  def main(args: Array[String]): Unit = {
    val pro1 = new pro("zhangsan", 18)
    val pro2 = new pro("lisi", 22)

    val proList = List(pro1, pro2)
    proList.foreach(x => {
      x match {
        case pro("zhangsan", 18) => println(" I am  zhang san ")
        case _ => println(" no match ")
      }
    })


  }

}
